<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>
			店铺设置
		</title>
		<script src="{{__PUBLIC__}}/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="{{__PUBLIC__}}/bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>		
		<script src="{{__PUBLIC__}}/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="{{__PUBLIC__}}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/hdjs/hdjs.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/bootstrap/css/bootstrap-theme.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/bootstrap/css/bootstrap.css"/>
		<script type="text/javascript">var root = "{{__ROOT__}}";</script>
	</head>
	<body>
		<a style="display:inline-block;margin: 20px 20px 0" href="{{U('Waimai/Set/add')}}">
			<button class="btn btn-success-lg">
			
				添加店铺
			
			</button>
		</a>
		<p style="padding: 20px;">
			复制以下链接到菜单中:
			{{__ROOT__}}/index.php?m=Cy&c=Index&a=index&wxid={{$wxid}}
		</p>
		<table class="hd-table hd-table-list">
			<thead>
				<tr>
					<td class='hd-w200'>
						名称
					</td>
					<td>
						地址
					</td>
				</tr>
			</thead>
			<tbody>
				{{foreach from="$data" key="$k" value="$v"}}
				<tr class="hd-h50">
					<td>
						<a target="_blank"  class="pwd" href="{{U('Dianpu/Login/login',array('wxid'=>$v['wxid'],'id'=>$v['id']))}}" style="margin-left: 30px; color: blue;">
							{{$v['name']}}
						</a>
					</td>
					<td>
						{{$v['address']}}
					</td>
				</tr>
				{{endforeach}}
			</tbody>
		</table>
			
		<!--<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="exampleModalLabel">
							请输入密码
						</h4>
					</div>
					<script type="text/javascript">
						$(function(){
							
							$("td").delegate('.pwd','click',function(){
								var id = this;
								$.post('{{U("Waimai/Set/getShop")}}',{'wxid':$(this).attr('wxid')},function(data){
									
									for(var a in data) {
										if($(id).attr('cgid')==data[a].id)
										{
											var opt = '<option selected value="'+data[a].id+'">'+data[a].name+'</option>';
										}
										else
										{
											var opt = '<option value="'+data[a].id+'">'+data[a].name+'</option>';
										}
										
										$('#recipient-name').append(opt);
									}
								},'json')
															
							})							
						})
						
						
					</script>
					
					<div class="modal-body">
						<form id="form">
							<input type="hidden" name="wxid" value="{{$wxid}}"/>
							<div class="form-group">								
								<label for="recipient-name" class="control-label">店铺名称</label>
									<select class="form-control" name="id" id="recipient-name">
									  
									</select>
							</div>
							<div class="form-group">
								<label for="recipient-name" class="control-label">密码</label>
								<input type="password" name="password" class="form-control" id="recipient-name">
									
							</div>
							<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">
							返回
						</button>
						<a target="_blank" type="submit" id="btn" class="btn btn-primary">
							登录
						</a>
					</div>
						</form>
						<script type="text/javascript">

							ajaxPost("{{U('Dianpu/Login/login')}}",'form','btn',"{{U('Dianpu/Index/index')}}");
					
						</script>
					</div>
					
				</div>
			</div>
		</div>-->
	</body>
	
</html>